<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>登录 - OJ系统</title>
    <style>
        .container {
            width: 400px;
            margin: 100px auto;
            text-align: center;
        }
        .input-group {
            margin: 15px 0;
        }
        input {
            width: 300px;
            height: 30px;
            padding: 5px;
            font-size: 16px;
        }
        button {
            width: 312px;
            height: 40px;
            background-color: #4CAF50;
            color: white;
            border: none;
            font-size: 16px;
            cursor: pointer;
        }
        button:hover {
            background-color: #45a049;
        }
        .error {
            color: red;
            margin: 10px 0;
        }
    </style>
</head>
<body>
    <div class="container">
        <h1>用户登录</h1>
        <form action="/login" method="post">
            <div class="input-group">
                <input type="text" name="username" placeholder="用户名" required>
            </div>
            <div class="input-group">
                <input type="password" name="password" placeholder="密码" required>
            </div>
            <button type="submit">登录</button>
        </form>
        <div class="error">
            <!-- 错误信息会在这里显示 -->
        </div>
        <p>还没有账号？<a href="/register">立即注册</a></p>
    </div>
</body>
</html>